﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MyMainSite.Models;

namespace MyMainSite.Controllers
{
    public class SearchController : Controller
    {
        //
        // GET: /Search/

        public ActionResult Index(string term)
        {
            if (String.IsNullOrEmpty(term))
                return new RedirectResult("/");

            SearchIndexModel m = new SearchIndexModel(term);

            m.CurrentController = "Search";

            return View(m);
        }
    }
}
